﻿<Window x:Class="GeometryViz3D.Views.AddPointDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Add Point" 
    ResizeMode="NoResize" WindowStartupLocation="CenterOwner"
    FocusManager.FocusedElement="{Binding ElementName=tbName}">
    <Window.Resources>
        <Style x:Key="labelStyle" TargetType="Label">
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <Style x:Key="textBoxStyle" TargetType="TextBox">
            <Setter Property="Margin" Value="2" />
        </Style>
    </Window.Resources>
    
    <DockPanel Margin="3">
        <StackPanel DockPanel.Dock="Right" 
                    Orientation="Vertical" 
                    MinWidth="80" 
                    Margin="4, 0, 0, 0">
            <Button Margin="2" 
                    Name="bnAdd" 
                    Content="Add"
                    IsDefault="True" 
                    Command="{Binding AddPointCommand}" 
                    TabIndex="10" />
            <Button Margin="2" 
                    Name="btnClose" 
                    Content="Close"
                    IsCancel="True" 
                    TabIndex="12" />
        </StackPanel>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition MinWidth="60" Width="60" />
                <ColumnDefinition MinWidth="100" />
            </Grid.ColumnDefinitions>

            <Label Grid.Column="0" 
                   Grid.Row="0"  
                   Style="{StaticResource labelStyle}"
                   Content="Label:" 
                   TabIndex="0" />
            <TextBox Grid.Column="1"
                     Grid.Row="0"
                     Style="{StaticResource textBoxStyle}"
                     Text="{Binding Path=Label, UpdateSourceTrigger=PropertyChanged}" 
                     TabIndex="1" />
            <Label Grid.Column="0" 
                   Grid.Row="1" 
                   Style="{StaticResource labelStyle}"
                   Content="X:"
                   TabIndex="2" />
            <TextBox Name="tbX" 
                     Grid.Column="1" 
                     Grid.Row="1" 
                     Style="{StaticResource textBoxStyle}"
                     Text="{Binding Path=X, UpdateSourceTrigger=PropertyChanged}" 
                     TabIndex="3" />
            <Label Grid.Column="0" 
                   Grid.Row="2" 
                   Style="{StaticResource labelStyle}"
                   Content="Y:"
                   TabIndex="4" />
            <TextBox Grid.Column="1" 
                     Grid.Row="2" 
                     Style="{StaticResource textBoxStyle}"
                     Text="{Binding Path=Y, UpdateSourceTrigger=PropertyChanged}" 
                     TabIndex="5" />
            <Label Grid.Column="0" 
                   Grid.Row="3" 
                   Style="{StaticResource labelStyle}"
                   Content="Z:"
                   TabIndex="6" />
            <TextBox Grid.Column="1" 
                     Grid.Row="3" 
                     Style="{StaticResource textBoxStyle}"
                     Text="{Binding Path=Z, UpdateSourceTrigger=PropertyChanged}" 
                     TabIndex="7" />
        </Grid>
    </DockPanel>
</Window>
